﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VINETLIFE.BL;
using VINETLIFE.DO;
using System.Data;

namespace VINETLIFE.Module
{
    public partial class ucHomeVideo : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                DataTable dtVideo = new MediaBL().GetHomePageVideo();
                if (dtVideo.Rows.Count > 0)
                {
                    video.Attributes.Add("src","http://youtube.com/embed/" + dtVideo.Rows[0]["MediaUrl"]);
                }
            }

        }
    }
}